//
//  Fog.m
//  RL_项目二
//
//  Created by rimi on 16/3/28.
//  Copyright © 2016年 ruifengpeixun. All rights reserved.
//

#import "Fog.h"

@implementation Fog
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _fog = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0,self.frame.size.width, self.frame.size.height)];
        _fog.image = [UIImage imageNamed:@"fog"];
        [self addSubview:_fog];
    }
    return self;
}

- (void)disMiss{
    [UIView animateWithDuration:0.5 animations:^{
        self.transform = CGAffineTransformMakeScale(0.1, 0.1);
        self.alpha = 0;
    } completion:^(BOOL finished){
        [self removeFromSuperview];
    }];
}

@end
